package config

import (
	"github.com/zeromicro/go-zero/core/logx"
	"github.com/zeromicro/go-zero/rest"
)

type Config struct {
	RestServices      map[string]ServiceConfig
	Mysql             MysqlConfig
	LogConf           logx.LogConf
	SQLite            SQLiteConfig
	UseMysql          bool
	ServicesLogConfig map[string]ServicesLogConfig
}

type MysqlConfig struct {
	DataSource string
	Tables     struct {
		UserInfoTable          string
		AgentHeartbeats        string
		ComponentInfo          string
		DeploymentLogs         string
		DocumentationKnowledge string
		AlertRules             string
		AlertRulesInfo         string
		Notifications          string
	}
}

type SQLiteConfig struct {
	DataSource string
	Tables     struct {
		UserInfoTable          string
		AgentHeartbeats        string
		ComponentInfo          string
		DeploymentLogs         string
		DocumentationKnowledge string
		AlertRules             string
		AlertRulesInfo         string
		Notifications          string
	}
}

type ServiceConfig struct {
	RestConf rest.RestConf
}

type ServicesLogConfig struct {
	logx.LogConf
}
